﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace ComesEnCasa
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            string[] namespaces = new[] { "ComesEnCasa.Web.Controllers" };

            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");


            routes.MapRoute("LogotipoNormal",
                "Entidad/{entidadId}/imagen.jpg",
               new
               {
                   controller = "Entidad",
                   action = "Imagen",
                   entidadId = "",
                   ancho = 0,
                   alto = 0,
                   fit = true
               }, namespaces);


            routes.MapRoute(
               "Default",
               "{controller}/{action}/{id}",
               new
               {
                   action = "Index",
                   controller = "Home",
                   id = UrlParameter.Optional
               },
               namespaces
           );
        }
    }
}